home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / JAVANMI.ZIP / LittleWalk / ToolHelp.java < prev   
Text File  |  1997-01-21  |  585b  |  31 lines

  1. import ProcessEntry32;
  2. import java.util.*;
  3.  
  4. class ToolHelp extends Object
  5. {
  6.     static { System.loadLibrary("tlh"); } 
  7.     // Load the native system library
  8.  
  9.     final private int TH32CS_SNAPPROCESS = 2;
  10.  
  11.     private Vector ProcEntries;
  12.     public ToolHelp()
  13.     {
  14.         ProcEntries = new Vector();
  15.         CreateToolhelp32Snapshot( 
  16.             TH32CS_SNAPPROCESS,
  17.             0, 
  18.             ProcEntries);
  19.     }
  20.  
  21.     public Vector getProcList()
  22.     {
  23.         return ProcEntries;
  24.     }
  25.     
  26.     // native function declaration
  27.     private native boolean CreateToolhelp32Snapshot( 
  28.         int dwFlags, 
  29.         int th32ProcessID,
  30.         Vector vector);
  31. }